package main

import "fmt"

type Inter interface {
	Get() int
	Set(int)
}
type St struct {
	Age int
}

func (s St) Get() int {
	return s.Age
}
func (s *St) Set(age int) {
	s.Age = age
}
func test(i Inter) {
	i.Set(10)
	fmt.Println(i.Get())
}

func printAll(vals []interface{}) {
	for _, val := range vals {
		fmt.Println(val)
	}
}
func main() {
	s := St{}
	test(&s)
	fmt.Println(s.Get())

	anyArr := [...]interface{}{1, 2, "a", "b"}
	anySlice := []interface{}{1, 2, "a", "b"}
	fmt.Printf("%T-%v    %T-%v\n", anyArr, anyArr, anySlice, anySlice)
	printAll(anySlice)
}
